<template>
	<view class="u-page">
		<view class="u-top">
			<view class="u-flex">
				<view class="u-m-l-20">
					<u-icon name="arrow-left" color="''" size="20" @click="hideModel"></u-icon>
				</view>
				<view class="u-flex-1">
					<u-search v-model="keyword" :clearabled="false" @custom="getSubClient" placeholder="请输入公司名称"
						height="40" margin="20rpx" bg-color="#ffffff" placeholder-color="#A2A6AC"
						:action-style="{width:'130rpx',height:'80rpx',background:'#2A8FFC','border-radius':'25px','margin':'0 20rpx','font-size':'28rpx',color:'#fff','line-height':'80rpx','text-align':'center'}">
					</u-search>
				</view>
			</view>
		</view>
		<view class="content">
			<scroll-view scroll-y @scrolltolower="scrolllower" style="height: 100%;">
				<u-index-list index-list="" z-index="98" active-color="#fff">
					<view v-for="(item, index) in List" :key="index" class="list-box">
						<u-index-item>
							<u-index-anchor :text="item.title" bgColor="#fff"></u-index-anchor>
						</u-index-item>
						<view class="list-cell" v-for="(i,idx) in item.items" :key="i.name">
							<view class="u-flex-1 u-flex">
								<u-image width="45" height="45" border-radius="50%"></u-image>
								<text class="u-m-l-10">{{i.name}}</text>
							</view>
							<u-checkbox-group @change="(e) => selectClient(e, i.id)">
								<u-checkbox size="26" v-model="i.checked" :name="`${i.id}|$|${i.name}`"></u-checkbox>
							</u-checkbox-group>
						</view>
					</view>
				</u-index-list>

				<view class="loading-box">
					<u-loadmore :status="status" margin-top="40" margin-bottom="40" />
				</view>
			</scroll-view>
		</view>

		<view class="footer" @click="selectSure">确认</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				subID: '', //下属id
				planIdx: '', //第几个事项
				planItem: [],
				selectList: [], //默认选中
				n_selectList: [], //本业选择数据
				keyword: '',
				List: [{
					"KHJBXX": {
						"ID": "00CEAA020A8A4BA29CACBBE69C8012CA",
						"YGBH": "YG000386",
						"SJYGBH": "YG000020",
						"YGZH": "人事测试号1",
						"ZHMM": "E10ADC3949BA59ABBE56E057F20F883E",
						"GSMC": "人事测试号1",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "18758558663",
						"YGRZSJ": "2024-07-01T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000386",
						"SSZWBH": "114",
						"SSJGBH": "JG000083",
						"SSJGJD": "JG000001|JG000083",
						"YGPX": 0,
						"AddTime": "2024-07-02T09:20:59.763",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "183.159.213.55",
						"ChgTime": "2024-07-02T09:20:59.763",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "183.159.213.55",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "R"
				}, {
					"KHJBXX": {
						"ID": "017646BEA30D4FA6AFFDCB6EF2FE4B45",
						"YGBH": "YG000097",
						"SJYGBH": "YG000035",
						"YGZH": "hzy",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "侯周燕",
						"YGYX": "123@qq.com",
						"OpenID": "oEm8W5cgpUM-qbR6sbObfaXudpho",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "19511254883",
						"YGRZSJ": "2021-12-02T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000035|YG000097",
						"SSZWBH": "331",
						"SSJGBH": "JG000016",
						"SSJGJD": "JG000001|JG000003|JG000013|JG000016",
						"YGPX": 0,
						"AddTime": "2021-12-04T14:51:33.58",
						"AddAcc": "huangyy",
						"AddAccName": "黄玉叶",
						"AddIP": "115.196.5.56",
						"ChgTime": "2023-08-11T22:19:58.92",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "101.71.225.106",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": "o1GsJ0hvN_N28pnJhZ8sYze3USTc",
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "H"
				}, {
					"KHJBXX": {
						"ID": "05E6E16128074F9A902FB2D664757732",
						"YGBH": "YG000388",
						"SJYGBH": "YG000347",
						"YGZH": "zjqy2hc",
						"ZHMM": "98EAF4D9137D6C1E03EFCA8AC5963024",
						"GSMC": "洪澄浙江区域维护经理2",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "19817413046",
						"YGRZSJ": "2024-07-01T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000012|YG000347|YG000388",
						"SSZWBH": "114",
						"SSJGBH": "JG000083",
						"SSJGJD": "JG000001|JG000083",
						"YGPX": 0,
						"AddTime": "2024-07-03T13:38:34.543",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "183.159.213.55",
						"ChgTime": "2024-08-19T11:07:27.06",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "218.0.245.137",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "H"
				}, {
					"KHJBXX": {
						"ID": "0746872D6F954D7A8042E4DC582896F4",
						"YGBH": "YG000296",
						"SJYGBH": "YG000028",
						"YGZH": "fjquanzhou1",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "福建泉州客服1",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "123456789123",
						"YGRZSJ": "2023-05-04T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000028|YG000296",
						"SSZWBH": "191",
						"SSJGBH": "JG000063",
						"SSJGJD": "JG000001|JG000059|JG000063",
						"YGPX": 0,
						"AddTime": "2023-05-04T10:10:51.553",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "60.176.112.102",
						"ChgTime": "2023-05-17T09:06:35.89",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "115.216.125.145",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "F"
				}, {
					"KHJBXX": {
						"ID": "07A54484AA3943B48E4D42B6A781D167",
						"YGBH": "YG000212",
						"SJYGBH": "",
						"YGZH": "taizhou3",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "台州市客服3",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "13436346527",
						"YGRZSJ": "2022-11-17T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000212",
						"SSZWBH": "191",
						"SSJGBH": "JG000063",
						"SSJGJD": "JG000001|JG000059|JG000063",
						"YGPX": 0,
						"AddTime": "2022-11-17T10:18:08.29",
						"AddAcc": "xzadmin",
						"AddAccName": "管理员（xz）",
						"AddIP": "60.177.219.171",
						"ChgTime": "2022-11-17T10:18:08.29",
						"ChgAcc": "xzadmin",
						"ChgAccName": "管理员（xz）",
						"ChgIP": "60.177.219.171",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "JG000001|JG000059|JG000063",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "T"
				}, {
					"KHJBXX": {
						"ID": "08957D8D795F4AFC8469D37B93CA8EC8",
						"YGBH": "YG000114",
						"SJYGBH": "YG000035",
						"YGZH": "xsm",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "马建平",
						"YGYX": "123@qq.com",
						"OpenID": "oEm8W5d5BG6TbjwQs4hWAFS3oACw",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "15158087089",
						"YGRZSJ": "2022-03-01T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000035|YG000114",
						"SSZWBH": "331",
						"SSJGBH": "JG000016",
						"SSJGJD": "JG000001|JG000003|JG000013|JG000016",
						"YGPX": 0,
						"AddTime": "2022-03-18T09:21:55.947",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "115.220.222.145",
						"ChgTime": "2023-10-31T18:39:03.65",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "218.74.8.123",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": "o1GsJ0ubAZtAWF6zjLqyvHQUavQg",
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "M"
				}, {
					"KHJBXX": {
						"ID": "08BC543E8A5A48B9B02B12344744460B",
						"YGBH": "YG000192",
						"SJYGBH": "YG000185",
						"YGZH": "shaoxing1",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "绍兴市客服1",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "18851571555",
						"YGRZSJ": "2022-11-15T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000185|YG000192",
						"SSZWBH": "191",
						"SSJGBH": "JG000063",
						"SSJGJD": "JG000001|JG000059|JG000063",
						"YGPX": 0,
						"AddTime": "2022-11-15T13:30:34.29",
						"AddAcc": "xzadmin",
						"AddAccName": "管理员（xz）",
						"AddIP": "122.235.226.178",
						"ChgTime": "2022-11-17T09:58:56.96",
						"ChgAcc": "xzadmin",
						"ChgAccName": "管理员（xz）",
						"ChgIP": "60.177.219.171",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "JG000001|JG000059|JG000063",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "S"
				}, {
					"KHJBXX": {
						"ID": "0928E90418434E0B9E4D35A33A984B57",
						"YGBH": "YG000051",
						"SJYGBH": "YG000012",
						"YGZH": "WYY",
						"ZHMM": "E10ADC3949BA59ABBE56E057F20F883E",
						"GSMC": "万银莹【销售助理】",
						"YGYX": "qw15857125487@126.com",
						"OpenID": "oEm8W5ej9kFQzYv2_D0gce3Go0Cc",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "1",
						"YGSFZ": "",
						"YGSJ": "15857125487",
						"YGRZSJ": "2024-05-23T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000012|YG000051",
						"SSZWBH": "21",
						"SSJGBH": "JG000066",
						"SSJGJD": "JG000001|JG000066",
						"YGPX": 0,
						"AddTime": "2021-07-17T15:12:23.977",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "115.216.121.116",
						"ChgTime": "2024-08-26T10:41:11.817",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "125.119.124.203",
						"Deleted": "0",
						"Lng": "120.2052307128906",
						"Lat": "30.25727081298828",
						"WeiXinOpenID": "oKSSi0UNzuBWZ9A8YWrPDGl1eJQo",
						"UnionID": "o1GsJ0kkFoM5miVYNkg81gfjEmgQ",
						"CKJGJD": "JG000001|JG000066",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "W"
				}, {
					"KHJBXX": {
						"ID": "0BA0B1CC7E2742E7B0E61F557436ADBA",
						"YGBH": "YG000300",
						"SJYGBH": "YG000028",
						"YGZH": "fjnanping2",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "福建南平客服2",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "123456789123",
						"YGRZSJ": "2023-05-04T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000028|YG000300",
						"SSZWBH": "191",
						"SSJGBH": "JG000063",
						"SSJGJD": "JG000001|JG000059|JG000063",
						"YGPX": 0,
						"AddTime": "2023-05-04T10:13:11.07",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "60.176.112.102",
						"ChgTime": "2023-05-10T15:27:21.49",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "115.216.127.203",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "F"
				}, {
					"KHJBXX": {
						"ID": "0E0E0B36B71847058095EC80EC015E49",
						"YGBH": "YG000052",
						"SJYGBH": "YG000028",
						"YGZH": "stys",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "康悦娣",
						"YGYX": "123@qq.com",
						"OpenID": "oEm8W5fBkCRxhBhqLfDLYw1t9ZY0",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "1",
						"YGSFZ": "",
						"YGSJ": "15958154910",
						"YGRZSJ": "2021-07-17T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000028|YG000052",
						"SSZWBH": "21",
						"SSJGBH": "JG000015",
						"SSJGJD": "JG000001|JG000004|JG000015",
						"YGPX": 0,
						"AddTime": "2021-07-17T15:14:41.307",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "115.216.121.116",
						"ChgTime": "2022-01-04T08:36:55.093",
						"ChgAcc": "huangyy",
						"ChgAccName": "黄玉叶",
						"ChgIP": "122.235.225.192",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": "o1GsJ0oLwwL7ZUHXkSWnpiLQ-lOo",
						"CKJGJD": null,
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "K"
				}, {
					"KHJBXX": {
						"ID": "0F6A8C14B68C42F791CFC7D99C932DB6",
						"YGBH": "YG000028",
						"SJYGBH": "YG000020",
						"YGZH": "minml",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "闵明丽",
						"YGYX": "123@qq.com",
						"OpenID": "oEm8W5aRKgtrfQhGrB-f-sn1CngU",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "1",
						"YGSFZ": "",
						"YGSJ": "13606643033",
						"YGRZSJ": "2021-07-09T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000028",
						"SSZWBH": "8",
						"SSJGBH": "JG000076",
						"SSJGJD": "JG000001|JG000076",
						"YGPX": 0,
						"AddTime": "2021-07-09T17:32:15.76",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "36.24.124.104",
						"ChgTime": "2024-04-24T13:28:25.84",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "::1",
						"Deleted": "0",
						"Lng": "120.3451708984375",
						"Lat": "30.30212456597222",
						"WeiXinOpenID": "oKSSi0TGw_qTDJpaM3Xt5lyMiMHU",
						"UnionID": "o1GsJ0pvXnajM8LBH5dqsPFg4ZLI",
						"CKJGJD": "JG000001|JG000076",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "M"
				}, {
					"KHJBXX": {
						"ID": "12BA20ED0982475D9C980095C0997419",
						"YGBH": "YG000374",
						"SJYGBH": "YG000020",
						"YGZH": "gww",
						"ZHMM": "E10ADC3949BA59ABBE56E057F20F883E",
						"GSMC": "郭威威",
						"YGYX": "15068809724@163.com",
						"OpenID": "oEm8W5Y7K1alPaKr426v5VObf40w",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "15068809724",
						"YGRZSJ": "2024-06-18T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000374",
						"SSZWBH": "114",
						"SSJGBH": "JG000083",
						"SSJGJD": "JG000001|JG000083",
						"YGPX": 0,
						"AddTime": "2024-06-21T09:22:06.777",
						"AddAcc": "huangyy",
						"AddAccName": "办公室主任",
						"AddIP": "218.72.3.226",
						"ChgTime": "2024-06-28T10:20:56.213",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "36.24.127.68",
						"Deleted": "0",
						"Lng": "121.5594566514757",
						"Lat": "31.115960828993057",
						"WeiXinOpenID": null,
						"UnionID": "o1GsJ0riIbw0cuVJ8kRz3mnPDIDg",
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "G"
				}, {
					"KHJBXX": {
						"ID": "12FE7AEA246B4B988DAEC2FFAACEA40A",
						"YGBH": "YG000380",
						"SJYGBH": "YG000315",
						"YGZH": "shjl4",
						"ZHMM": "E10ADC3949BA59ABBE56E057F20F883E",
						"GSMC": "上海区域经理4包建华",
						"YGYX": "123@qq.com",
						"OpenID": "oEm8W5ZCOOApAtYsf-LXmud1YH3E",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "123456",
						"YGSJ": "19817447780",
						"YGRZSJ": "2024-07-01T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000315|YG000380",
						"SSZWBH": "114",
						"SSJGBH": "JG000083",
						"SSJGJD": "JG000001|JG000083",
						"YGPX": 0,
						"AddTime": "2024-07-01T09:12:27.79",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "183.159.213.55",
						"ChgTime": "2024-07-29T08:52:45.427",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "115.196.65.239",
						"Deleted": "0",
						"Lng": "121.51177490234375",
						"Lat": "31.075937228732638",
						"WeiXinOpenID": null,
						"UnionID": "o1GsJ0nGx8OILSWXyFUGyST-Son0",
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "S"
				}, {
					"KHJBXX": {
						"ID": "1305AB8C0E774592864E7525C9C844CD",
						"YGBH": "YG000376",
						"SJYGBH": "YG000347",
						"YGZH": "liaoyy",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "杭州区域经理廖延勇",
						"YGYX": "2602580681@qq.com",
						"OpenID": "oEm8W5RrgbiZh4exTJaG0MyXxYqc",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "zj888999",
						"YGSJ": "19857443364",
						"YGRZSJ": "2024-08-02T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000012|YG000347|YG000376",
						"SSZWBH": "114",
						"SSJGBH": "JG000083",
						"SSJGJD": "JG000001|JG000083",
						"YGPX": 0,
						"AddTime": "2024-06-27T09:49:34.82",
						"AddAcc": "huangyy",
						"AddAccName": "办公室主任",
						"AddIP": "36.24.127.68",
						"ChgTime": "2024-08-30T13:38:39.737",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "220.191.40.119",
						"Deleted": "0",
						"Lng": "120.34043836805556",
						"Lat": "30.284473741319445",
						"WeiXinOpenID": null,
						"UnionID": "o1GsJ0iL_K-9xtYGCdZ0obIVHP7w",
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "H"
				}, {
					"KHJBXX": {
						"ID": "1473FB71FA09462AA61508A3342EEC48",
						"YGBH": "YG000365",
						"SJYGBH": "YG000028",
						"YGZH": "wofu10",
						"ZHMM": "E10ADC3949BA59ABBE56E057F20F883E",
						"GSMC": "沃服10",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "18969170664",
						"YGRZSJ": "2024-04-15T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000028|YG000365",
						"SSZWBH": "331",
						"SSJGBH": "JG000076",
						"SSJGJD": "JG000001|JG000076",
						"YGPX": 0,
						"AddTime": "2024-05-06T08:44:15.057",
						"AddAcc": "huangyy",
						"AddAccName": "办公室主任",
						"AddIP": "36.27.60.31",
						"ChgTime": "2024-06-27T09:37:57.29",
						"ChgAcc": "huangyy",
						"ChgAccName": "办公室主任",
						"ChgIP": "36.24.127.68",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "JG000001|JG000076",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "W"
				}, {
					"KHJBXX": {
						"ID": "1557727FF8554E0A97AEB380380ADA12",
						"YGBH": "YG000339",
						"SJYGBH": "YG000028",
						"YGZH": "zjsd",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "浙江省/山东省",
						"YGYX": "23@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "17146815373",
						"YGRZSJ": "2022-05-27T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000028|YG000339",
						"SSZWBH": "191",
						"SSJGBH": "JG000076",
						"SSJGJD": "JG000001|JG000076",
						"YGPX": 0,
						"AddTime": "2023-11-13T08:59:06.113",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "218.74.8.85",
						"ChgTime": "2023-11-13T08:59:06.113",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "218.74.8.85",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "Z"
				}, {
					"KHJBXX": {
						"ID": "1633DBAD50224A6DB0D455F9C186ADE9",
						"YGBH": "YG000297",
						"SJYGBH": "YG000028",
						"YGZH": "fjputian3",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "福建莆田客服3",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "123456789123",
						"YGRZSJ": "2023-05-04T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000028|YG000297",
						"SSZWBH": "191",
						"SSJGBH": "JG000063",
						"SSJGJD": "JG000001|JG000059|JG000063",
						"YGPX": 0,
						"AddTime": "2023-05-04T10:11:19.367",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "60.176.112.102",
						"ChgTime": "2023-05-17T09:06:20.153",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "115.216.125.145",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "F"
				}, {
					"KHJBXX": {
						"ID": "1D3B916871B74DE3B6544C137253C563",
						"YGBH": "YG000209",
						"SJYGBH": "",
						"YGZH": "jinhua2",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "金华市客服2",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "18969174521",
						"YGRZSJ": "2022-11-17T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000209",
						"SSZWBH": "191",
						"SSJGBH": "JG000063",
						"SSJGJD": "JG000001|JG000059|JG000063",
						"YGPX": 0,
						"AddTime": "2022-11-17T10:16:01.04",
						"AddAcc": "xzadmin",
						"AddAccName": "管理员（xz）",
						"AddIP": "60.177.219.171",
						"ChgTime": "2022-11-17T10:16:01.04",
						"ChgAcc": "xzadmin",
						"ChgAccName": "管理员（xz）",
						"ChgIP": "60.177.219.171",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "JG000001|JG000059|JG000063",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "J"
				}, {
					"KHJBXX": {
						"ID": "1D67860C5A854A978D51F2B5C2AC55A1",
						"YGBH": "YG0000110",
						"SJYGBH": "YG0000110",
						"YGZH": "admin",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "管理员（误删）",
						"YGYX": "13688888888@qq.om",
						"OpenID": "oEm8W5Td6USOpY7XvfOlSlNg3VW0",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "13666666666",
						"YGRZSJ": "2020-12-09T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020",
						"SSZWBH": "1",
						"SSJGBH": "JG000001",
						"SSJGJD": "JG000001",
						"YGPX": 0,
						"AddTime": "0001-01-01T00:00:00",
						"AddAcc": null,
						"AddAccName": null,
						"AddIP": null,
						"ChgTime": "2024-06-13T14:02:52.243",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "36.24.127.223",
						"Deleted": "0",
						"Lng": "120.15859917534722",
						"Lat": "30.18092746310764",
						"WeiXinOpenID": "oKSSi0Ta8TQjL7iqAd5znSuqmkL0",
						"UnionID": "o1GsJ0iiWNXGJH9H8lpsUe1jWr4M",
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "G"
				}, {
					"KHJBXX": {
						"ID": "1D67860C5A854A978D51F2B5C2AC55AA",
						"YGBH": "YG000034",
						"SJYGBH": "YG000024",
						"YGZH": "sxh",
						"ZHMM": "E10ADC3949BA59ABBE56E057F20F883E",
						"GSMC": "杭州全沃财务部",
						"YGYX": "123@qq.com",
						"OpenID": "oEm8W5ZDN0wfKkt7J7Dip9Ws6Kj4",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "1",
						"YGSFZ": "",
						"YGSJ": "15088792832",
						"YGRZSJ": "2020-12-17T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000024|YG000034",
						"SSZWBH": "52",
						"SSJGBH": "JG000026",
						"SSJGJD": "JG000001|JG000024|JG000026",
						"YGPX": 0,
						"AddTime": "2021-07-16T12:11:46.517",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "115.216.121.116",
						"ChgTime": "2024-07-15T10:09:03.077",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "183.129.87.114",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": "oKSSi0dKckjayaOunT5BkjuvudXA",
						"UnionID": "o1GsJ0gxqqZciiTREWG5NbCqAokY",
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "H"
				}, {
					"KHJBXX": {
						"ID": "1E6785BAC37343E28CF54BC83350CE46",
						"YGBH": "YG000221",
						"SJYGBH": "YG000185",
						"YGZH": "ningbo2",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "宁波市客服2",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "18546270667",
						"YGRZSJ": "2022-11-17T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000185|YG000221",
						"SSZWBH": "191",
						"SSJGBH": "JG000063",
						"SSJGJD": "JG000001|JG000059|JG000063",
						"YGPX": 0,
						"AddTime": "2022-11-17T10:35:03.477",
						"AddAcc": "xzadmin",
						"AddAccName": "管理员（xz）",
						"AddIP": "60.177.219.171",
						"ChgTime": "2022-11-17T10:35:03.477",
						"ChgAcc": "xzadmin",
						"ChgAccName": "管理员（xz）",
						"ChgIP": "60.177.219.171",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "JG000001|JG000059|JG000063",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "N"
				}, {
					"KHJBXX": {
						"ID": "23247FF6A49B4EC591730794063257F7",
						"YGBH": "YG000216",
						"SJYGBH": "YG000185",
						"YGZH": "qvzhou3",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "衢州市客服3",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "17623437867",
						"YGRZSJ": "2022-11-17T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000020|YG000185|YG000216",
						"SSZWBH": "191",
						"SSJGBH": "JG000063",
						"SSJGJD": "JG000001|JG000059|JG000063",
						"YGPX": 0,
						"AddTime": "2022-11-17T10:27:02.707",
						"AddAcc": "xzadmin",
						"AddAccName": "管理员（xz）",
						"AddIP": "60.177.219.171",
						"ChgTime": "2022-11-17T10:27:02.707",
						"ChgAcc": "xzadmin",
						"ChgAccName": "管理员（xz）",
						"ChgIP": "60.177.219.171",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "JG000001|JG000059|JG000063",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "Q"
				}, {
					"KHJBXX": {
						"ID": "24137A8C5E89413AA47842C8EC468014",
						"YGBH": "YG000159",
						"SJYGBH": "YG000028",
						"YGZH": "zjqwxszl",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "采购员",
						"YGYX": "123@qq.com",
						"OpenID": "oEm8W5V97Q9WmFpfn-by8Bggt-ug",
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "1",
						"YGSFZ": "",
						"YGSJ": "15068817394",
						"YGRZSJ": "2022-05-05T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000028|YG000159",
						"SSZWBH": "21",
						"SSJGBH": "JG000015",
						"SSJGJD": "JG000001|JG000004|JG000015",
						"YGPX": 0,
						"AddTime": "2022-09-03T18:06:49.91",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "115.216.120.151",
						"ChgTime": "2024-02-19T17:25:15.393",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "115.196.192.45",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": "o1GsJ0ooTxmKKpe9F-I0JbKaG3Zc",
						"CKJGJD": "JG000001|JG000004|JG000015",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "C"
				}, {
					"KHJBXX": {
						"ID": "246EB6E7AE704BA6A8D5CEA1F666B9DD",
						"YGBH": "YG000290",
						"SJYGBH": "YG000028",
						"YGZH": "fjxiamen1",
						"ZHMM": "C3E2870D9736AA451D9D5D56E6B5DD5B",
						"GSMC": "福建厦门客服1",
						"YGYX": "123@qq.com",
						"OpenID": null,
						"YGSR": "0001-01-01T00:00:00",
						"YGXB": "0",
						"YGSFZ": "",
						"YGSJ": "123456789123",
						"YGRZSJ": "2023-05-04T00:00:00",
						"YGLXDZ": "",
						"YGXL": "",
						"YGZY": "",
						"BYYX": "",
						"BZ": "",
						"YGJD": "YG000020|YG000028|YG000290",
						"SSZWBH": "191",
						"SSJGBH": "JG000063",
						"SSJGJD": "JG000001|JG000059|JG000063",
						"YGPX": 0,
						"AddTime": "2023-05-04T10:06:47.883",
						"AddAcc": "admin",
						"AddAccName": "管理员（误删）",
						"AddIP": "60.176.112.102",
						"ChgTime": "2023-05-17T09:10:06.17",
						"ChgAcc": "admin",
						"ChgAccName": "管理员（误删）",
						"ChgIP": "115.216.125.145",
						"Deleted": "0",
						"Lng": null,
						"Lat": null,
						"WeiXinOpenID": null,
						"UnionID": null,
						"CKJGJD": "",
						"CKJGBH": null,
						"IsNull": false
					},
					"index": "F"
				}],
				status: 'loading',
			}
		},
		props: {
			subid: {
				type: String,
				default: ''
			},
			item: {
				type: Object,
				default: {}
			}
		},
		created(e) {
			this.subID = this.subid;
			this.selectList = this.item.list || [];
			this.List = this._normalizeSinger(this.List);
			// this.getSubClient();
		},
		methods: {
			getSubClient(id) { //获取列表
				uni.showLoading({
					title: '加载中',
					mask: true
				})
				let params = {
					YGID: this.subID,
					GSMC: this.keyword,
					pageNum: 1,
					pageSize: 100000
				}
				// this.$minApi.app._GetXSGLKH(params).then(res => {
				// 	uni.hideLoading();
				// 	const datas = res.data.x_clientList || [];
				// this.List = this._normalizeSinger(datas);
				// 	this.status = datas.length < 20 ? 'nomore' : 'loading';
				// }).catch(() => {})
			},
			selectClient(e, id) { //选择
				let datas = this.selectList;
				let list = []
				let info;
				if (e.length) {
					list = e[0].split('|$|') || [];
					info = {
						id: list[0],
						name: list[1]
					}
				}

				if (e.length) {
					datas.push(info)
				} else {
					datas.forEach((item, index) => {
						if (item.id == id) {
							datas.splice(index, 1);
						}
					})
				}
				console.log(datas);
			},
			hideModel() {
				this.$emit('hideSubClientPop');
			},
			selectSure() {
				let info = {};
				const selectList = this.selectList || [];
				if (selectList.length > 0) {
					info.id = this.subID;
					info.list = selectList;
				}
				this.$emit('updateSubClient', info);
			},
			_normalizeSinger(list) {
				let map = {};
				list.forEach((item, index) => {
					const key = item.index;
					if (!map[key]) {
						map[key] = {
							title: key,
							items: []
						}
					}

					const hasSelect = this.selectList.find(d => {
						return d.id == item.KHJBXX.ID
					})

					map[key].items.push({
						name: item.KHJBXX.GSMC,
						id: item.KHJBXX.ID,
						checked: hasSelect ? true : false
					})
				})
				let ret = [],
					hot = [];
				for (let key in map) {
					let val = map[key]
					if (val.title.match(/[a-zA-Z0-9]/)) {
						ret.push(val);
					}
				}
				ret.sort((a, b) => {
					return a.title.charCodeAt(0) - b.title.charCodeAt(0)
				})
				return hot.concat(ret)
			},
			scrolllower() {
				this.status = 'nomore';
			},
		}

	}
</script>

<style lang="scss" scoped>
	/deep/ .u-index-list__letter {
		display: none;
	}

	.u-page {
		background: #F1F1F5;
		height: 100%;
		overflow: hidden;
		display: flex;
		flex-direction: column;

		.u-flex {
			display: flex;
			align-items: center;
		}

		.u-m-l-20 {
			margin-left: 20px;
		}

		.u-flex-1 {
			flex: 1;
		}

		.u-top {
			background-color: #F1F1F5;
			width: 100%;
		}

		.content {
			flex: 1;
			overflow: hidden;
		}

		.list-box {
			background-color: #fff;
			margin-bottom: 20rpx;
		}

		.list-cell {
			height: 120rpx;
			display: flex;
			align-items: center;
			box-sizing: border-box;
			overflow: hidden;
			color: #333;
			font-size: 32rpx;
			margin: 0 40rpx;
			border-bottom: 1px solid #E5E5E5;
		}

		.list-cell:nth-last-child(1) {
			border: none;
		}

		.anchor-text {
			font-size: 28rpx;
			color: #666666;
			padding-left: 40rpx;
		}

		.sub-box {
			background-color: #fff;
			text-align: center;

			.sub-title {
				line-height: 80rpx;
				font-size: 28rpx;
				color: #7A808A;
			}
		}

		.footer {
			position: absolute;
			width: 100%;
			left: 0;
			bottom: 0;
			background-color: #2A8FFC;
			line-height: 100rpx;
			z-index: 10;
			font-size: 28rpx;
			text-align: center;
			color: #fff;
		}
	}

	.u-m-l-10 {
		margin-left: 10px;
	}

	.loading-box {
		overflow: hidden;
	}
</style>